package chapter3to7.src.main.java.com.kaikeba.concurrent;

/**
 * @author : wushikai
 * <p>
 * date : 2021-03-20
 *
 * idea 线程照相机
 *
 */
public class MyThread extends Thread {

    @Override
    public void run() {
        System.out.println(  this.getName()+" --> 启动" );
        System.out.println(  this.getName()+" --> 启动" );
    }


    public static void main(String[] args){


        MyThread thread = new MyThread();


        thread.setName("caonima");
        thread.start();


        for (int i = 0; i < 5; i++) {

            MyThread myThread = new MyThread();
            myThread.setName("线程"+i);
            myThread.start();
        }
    }

}
